<?php
/**
 * TomatoCMS
 *
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@tomatocms.com so we can send you a copy immediately.
 *
 * @copyright    Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
 * @license        http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @version        $Id: category.phtml 5186 2010-08-30 12:02:46Z huuphuoc $
 * @since        2.0.0
 */
?>
<?php
$this->headTitle(@$this->category->category_content_name?@$this->category->category_content_name:@$this->category->category_admin_name);
?>
<style>
    .t_news_category{
        padding-top:20px;
    }
</style>
<?php if(count($this->categories) > 0):?>
    <?php foreach ($this->categories as $category):?>
        <div class="t_news_category">
            <div class="box subcolumns">
                <div class="cufon_title">
                    <div class="inner">
                        <h3><a href="<?php echo $this->url($category->getProperties(), 'shop_category_product_list') ?>"><?php echo $category->category_content_name?$category->category_content_name:$category->category_admin_name; ?></a></h3>
                    </div>
                </div>
            </div>
            <?php if (count($products = $this->products[$category->category_id])) : ?>
            <ul>
                <?php foreach ($products as $product) : ?>
                <li>
                    <a href="<?php ?>"><?php echo $product->product_content_name?$product->product_content_name:$product->product_admin_name; ?></a>
                </li>
                <?php endforeach; ?>
            </ul>
            <?php endif; ?>
        </div>
    <?php endforeach;?>
<?php else:?>
    <div class="t_news_category">
        <div class="box subcolumns">
            <div class="cufon_title">
                <div class="inner">
                    <h3><a href="<?php /*echo $this->url($this->category->getProperties(), 'shop_category_product_list')*/ ?>"><?php echo $this->category->category_content_name?$this->category->category_content_name:$this->category->category_admin_name; ?></a></h3>
                </div>
            </div>
        </div>
        <?php if (count($products = $this->products)) : ?>
        <ul>
            <?php foreach ($products as $product) : ?>
            <li>
                <a href="<?php ?>"><?php echo $product->product_content_name?$product->product_content_name:$product->product_admin_name; ?></a>
            </li>
            <?php endforeach; ?>
        </ul>
        <?php endif; ?>
    </div>
<?php endif;?>